projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e778d99
)
util: Fix memory leak test.
author
oliskoli
<oliskoli>
Fri, 15 Aug 2008 21:16:34 +0000
(21:16 +0000)
committer
oliskoli
<oliskoli>
Fri, 15 Aug 2008 21:16:34 +0000
(21:16 +0000)
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index 0a1caf42d60fce4fed2acf09026d22cbe3a100ff..07bd7355ee8ef698ffb6420c98559043344a4fd7 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-210,8
+210,10
@@
xrealloc(void *p, size_t s)
{
char *o = (char *) realloc(p,s);
#ifdef DEBUG_MEM
- debug_mem_output( "realloc, %x, %x, %x, %s, %d\n",
- o, p, s, file, line );
+ if (p != NULL)
+ debug_mem_output( "realloc, %x, %x, %x, %s, %d\n", o, p, s, file, line );
+ else
+ debug_mem_output( "malloc, %x, %d, %s, %d\n", o, s, file, line );
#endif
if (!o) {